# ADMIN: Check admin rights
# This is the main controller that controls all the data mining activities.  
#
# Methods:
# - getAll()
# - getOne()  
#
# Comments:
# - This class is the only class in the entire app that stores the user data when the user is using the app.
# - _id is the internal ID used by the app, do not modifiy.
# - fname is the file name of the input data  
#
# Dependencies:
# - baseController depends on face_controller and bets_controller,
# - sports_contorller and users_controllers are subclasses of base_controller.
# - Prize_controller directly depend on the getAll() method of this class.  

class Admin::BaseController < ApplicationController
  before_filter :require_admin
  protected
    def require_admin
      unless current_user.admin?
        flash[:error] = "Access to Admin Denied"
        redirect_to root_path
      end
    end
end
